package com.firesrc.mail.search;

import java.io.IOException;
import java.util.HashSet;
import java.util.Set;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

public class SearchMailWhoisSoftImpl extends AbstractSearchMail {

	@Override
	public Set<String> getMailListFromUrl(String url) {
		try {
			Document doc = Jsoup.connect("http://whoissoft.com/" + url).userAgent("i as firefox") // ����User-Agent
					.cookie("auth", "token") // ����cookie
					.timeout(10000) // �������ӳ�ʱʱ��
					.get();
			return getMailListFromText(doc.text());
		} catch (IOException e) {
			// TODO Auto-generated catch block
			System.out.println("分析网站whisoSoft出现错误:" + url);
		}
		return new HashSet<String>();
	}

}
